//
//  HomeQuestionChooseTableViewCell.m
//  ZJControlsClass
//
//  Created by mac on 2024/11/18.
//

#import "HomeQuestionChooseTableViewCell.h"

@interface HomeQuestionChooseTableViewCell ()




@end



@implementation HomeQuestionChooseTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self){
        
        [self configUI];
        
        
    }
    return self;
}

-(void)configUI{
    
    [self.contentView addSubview:self.follewView];
    [self.follewView addSubview:self.msgLabel];
    
    [self.follewView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView).with.offset(ALIGN_WIDTH_PT(15));
        make.right.equalTo(self.contentView).with.offset(-ALIGN_WIDTH_PT(15));
        make.top.equalTo(self.contentView).with.offset(ALIGN_HEIGHT_PT(7.5));
        make.height.equalTo(@(ALIGN_HEIGHT_PT(45)));
    }];
    
    [self.msgLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.right.bottom.equalTo(self.follewView);
        make.left.equalTo(self.follewView).with.offset(ALIGN_WIDTH_PT(15));
    }];
    
    
    
}
-(void)setModel:(HomeQuestionOptionsListModel *)model{
    _model = model;
    self.msgLabel.text = [NSString stringWithFormat:@"%@.%@",self.model.title,self.model.text];
}



#pragma amrk -- 懒加载
-(UIView *)follewView{
    if (!_follewView){
        _follewView = [UIView new];
        _follewView.layer.cornerRadius = 5;
        _follewView.layer.masksToBounds = YES;
        _follewView.backgroundColor = COLOR_RGB(244, 244, 244);
    }
    return _follewView;
}

-(UILabel *)msgLabel{
    if (!_msgLabel){
        _msgLabel = [UILabel new];
        _msgLabel.font = FONT14;
        _msgLabel.textColor = [UIColor blackColor];
        _msgLabel.textAlignment = NSTextAlignmentLeft;
    }
    return _msgLabel;
}




@end
